package com.jrx.anytxn.investor.job.file.day.order.step;

import com.jrx.anytxn.investor.constant.TransBizConstant;
import com.jrx.anytxn.investor.entity.AmLoanAccountInvestorInfo;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.batch.MyBatisPagingItemReader;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

public class DayOrderFirstReader extends MyBatisPagingItemReader<AmLoanAccountInvestorInfo> {

    public DayOrderFirstReader(SqlSessionFactory sqlSessionFactory, Integer pagesize){
        setSaveState(false);
        setPageSize(pagesize);
        setSqlSessionFactory(sqlSessionFactory);
        setQueryId("com.jrx.anytxn.investor.mapper.ext.ExtAmLoanAccountInvestorInfoMapper.selectByStatusList");
        Map<String, Object> map = new HashMap<>();
        map.put("statusList", Arrays.asList(TransBizConstant.LOAN_STATUS_1,TransBizConstant.LOAN_STATUS_2));
        setParameterValues(map);
    }
}
